home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DO1002.ARJ
/
SUBST.SCR
< prev
next >
Wrap
Text File
|
1991-12-03
|
949b
|
29 lines
.pg wi full clr cy
COMMAND NAME»gray«: »%t« SubstituteString »ye«
/SUBST {variable} {string} {target} {phrase} [{start}]
/cw
Substitutes »cy«{phrase}»#« for every occurance of »cy«{phrase}»#« in
»cy«{string}»#« and places the result in »cy«{variable}»#«.
If the optional »cy«{start}»#« position is entered. »%t«DO»#« starts the
search at that position. If found, the target is changed and the
»ye«absolute position»#« in »cy«{string}»#« is returned in the variable »gr«STRPOS»#«.
Here are some examples:
|/SUBST Result "Test of Substitute String" "Substitute " »bo«Substitute»#«
Result: "%Result" , Strpos: %StrPos(###)
Notice that you can substitute configuration variables in strings.
|/SUBST Result 123456789 4 "here it is" 2
Result: "%Result" , Strpos: %StrPos(###)
|/SUBST Result 123456789 2 "not here" 3
Result: "%Result" , Strpos: %StrPos(###)
/ENDEXEC CLEAR